package com.example.rabbit.consumer;

import com.example.rabbit.config.SeniorConfirmConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author ifredomvip@gmail.com
 * @Date 2022/8/15 14:16
 * @Version 1.0.0
 * @Description
 **/
@Slf4j
@Component
public class SeniorWarningConsumer {


    @RabbitListener(queues = SeniorConfirmConfig.BACKUP_WARNING_QUEUE)
    public void consumerWarningMessage(Message message) {
        log.info("发现不可到达交换机，自动执行不可到达交换机上已经绑定的备份交换机");
        String msg = new String(message.getBody());
        log.info("==========" + msg);

    }
}
